import request from '@/utils/request';
// import { AxiosPromise } from 'axios';
// import { LoginData, LoginResult, VerifyCodeResult, TenantInfo } from './types';
// import { UserInfo } from '@/api/system/user/types';

// pc端固定客户端授权id
const clientId = import.meta.env.VITE_APP_CLIENT_ID;

/**
 * @param data {LoginData}
 * @returns
 */



// 获取营业收入管理详细信息
export function getoperatingRevenueList(pageSize, pageNum) {
  return request({
    url: `/system/operatingRevenue/list1?pageSize=${pageSize}&pageNum=${pageNum}`,
    method: 'get'
  });
}
export const listOperatingRevenue = (query) => {
  return request({
    url: '/system/operatingRevenue/list1',
    method: 'get',
    params: query
  });
};

// 新增营业收入管理
export function addOperatingRevenue(data) {
  const params = {
    ...data
  };
  return request({
    url: '/system/operatingRevenue',
    method: 'post',
    data: params
  });
}
// 修改营业收入管理
export function putOperatingRevenue(data) {
  const params = {
    ...data
  };
  return request({
    url: '/system/operatingRevenue',
    method: 'put',
    data: params
  });
}

// 导入数据
export function importData(data) {
  const params = {

  };
  return request({
    url: '/system/operatingRevenue/importData',
    method: 'post',
    data: params
  });
}

// 导出营业收入管理列表
export function exportData(data) {
  const params = {

  };
  return request({
    url: '/system/operatingRevenue/export',
    method: 'post',
    data: params
  });
}

// 获取导入模板
export function importTemplate(data) {
  const params = {

  };
  return request({
    url: '/system/operatingRevenue/importTemplate',
    method: 'post',
    data: params
  });
}
/**
 * 删除营业收入管理
 * @param operatingRevenueId
 */
export const delOperatingRevenue = (operatingRevenueId) => {
  return request({
    url: '/system/operatingRevenue/' + operatingRevenueId,
    method: 'delete'
  });
};
